home *** CD-ROM | disk | FTP | other *** search
- Path: news.cac.psu.edu!psuvm!cwf102
- Organization: Kyr's Condom Cantina
- X-Subliminal-Message: You want to buy my condoms... :)
- Rationale: Hack and Slay!!
- Date: Fri, 19 Jan 1996 11:39:01 EST
- From: The Mighty Stymie <CWF102@psuvm.psu.edu>
- Message-ID: <96019.113901CWF102@psuvm.psu.edu>
- Newsgroups: comp.lang.c++
- Subject: Re: BORLAND C++ 4.5 wont add .1 and .9
- References: <1996Jan18.044900.10609@oasis.enmu.edu>
-
- I believe your problem has something to do with the way Borland stroes floating
- point numbers. I had a similar problem recently:
-
- if(x>0.1)
- do this
- else
- do that
-
- If x=0.1 it would still do "this" and it wouldn't do "that" until x<0.1
- I was only concerned with increments or decrements of 0.1, so I did this
-
- if(x>0.11)
- do this
- else
- do that
-
- If you tack on a digit beyond the on your concerned with, things may work. As
- I finish this note, I forget what your problem was specifically, but I know it
- was similar to this. :)
- -christopher w. felter
-
- *******************************************************************************
- * ____ __ __ ____ Christopher W. Felter (alias: The Mighty Stymie) *
- * ---\ / / /--- cwf102@psuvm.psu.edu cwf102@email.psu.edu *
- * ---\ / /___/-- felt43@eetsg00.bd.psu.edu stymie@psu.edu *
- * \/ / / http://metro.turnpike.net/S/stymie *
- * / / "If I get home and there's sour cream on them, those *
- * / food, my husband's gonna be pissed. I said pissed!" *
- * / - Overweight, midwestern woman at Taco Bell, Oxford, *
- * Ohio (September 11, 1995) *
- *******************************************************************************
-